home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
B-Business
/
(c)b3.d64
/
print6_49.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2008-11-26
|
1KB
|
51 lines
100 PRINT"[147]WELCOME TO LOTTO6/49!!!!"
105 PRINT"THIS PROGRAM WILL PRINT 100 ";
110 PRINT"LISTS OF 6 RANDOM NUMBERS 1-49"
111 PRINT"PRESS RETURN"
112 GETA$:IFA$<>CHR$(13)GOTO112
115 PRINT"[147]ARE YOU USING A PRINTER? (Y/N)"
118 GET A$:IFA$=""THEN118
119 IFA$<>"Y"GOTO129
125 OPEN4,4,1:CMD4
129 PRINT"[147]THE COMPUTER HAS CHOSEN 100 COMBIN-"
130 PRINT"ATIONS OF 6 NUMBERS BETWEEN 1 AND 49."
135 PRINT"IF YOU'RE UNSURE ABOUT WHICH LINE TO"
140 PRINT"CHOOSE, HERE IS A RANDOM ORDER OF LINE NUMBERS 0-99."
145 PRINT: FORN=0TO99:P=INT(100*RND(1)):PRINTP;:NEXTN
146 PRINT:PRINT:IFA$<>"Y"THENGOSUB500
150 FORN=0TO99
155 A=INT(49*RND(1))+1
160 B=INT(49*RND(1))+1
165 C=INT(49*RND(1))+1
170 D=INT(49*RND(1))+1
175 E=INT(49*RND(1))+1
180 F=INT(49*RND(1))+1
190 IFB=ATHENGOTO160
195 IFC=ATHENGOTO165
200 IFC=BTHENGOTO165
205 IFD=ATHENGOTO170
210 IFD=BTHENGOTO170
215 IFD=CTHENGOTO170
220 IFE=ATHENGOTO175
225 IFE=BTHENGOTO175
230 IFE=CTHENGOTO175
235 IFE=DTHENGOTO175
240 IFF=ATHENGOTO180
245 IFF=BTHENGOTO180
250 IFF=CTHENGOTO180
255 IFF=DTHENGOTO180
260 IFF=ETHENGOTO180
270 L$=" "+STR$(N):M$=" "+STR$(A):N$=" "+STR$(B):O$=" "+STR$(C)
275 P$=" "+STR$(D):Q$=" "+STR$(E):R$=" "+STR$(F)
280 PRINTRIGHT$(L$,3);".";RIGHT$(M$,5);RIGHT$(N$,5);RIGHT$(O$,5);RIGHT$(P$,5);
285 PRINTRIGHT$(Q$,5);RIGHT$(R$,5)
290 NEXTN
295 IFA$<>"Y"THENEND
300 PRINT#4:CLOSE4:END
500 PRINT "TO STOP LINES SCROLLING, PRESS"
503 PRINT"RUN/STOP"
505 PRINT"TO CONTINUE TYPE 'CONT'"
520 PRINT:PRINT"PRESS RETURN"
525 GETB$:IFB$=""THEN525
530 IFB$=CHR$(13)THENRETURN